package collection;


import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class NewForDemo {
    public static void main(String[] args) {
        int[] ints = new int[]{3, 54, 77, 1, 4, 45};
        int a;
        for (Integer ob : ints) {
            System.out.println(ob);
        }

        Collection<Object> collection = new ArrayList();
        collection.add("1");
        collection.add(2);
        collection.add(new Point(2, 1));
        collection.add("4");
        collection.add("顺风使帆");
        Iterator<Object> it = collection.iterator();
        while (it.hasNext()) {
            System.out.println(it.next());
        }
        System.out.println("-------------------");
        Iterator it2 = collection.iterator();
        for (; it2.hasNext(); ) {
            System.out.println(it2.next());
        }
        for (Object ob2 : collection) {
            System.out.print(ob2);
        }
        String s=";";
      //  Integer.parseInt()

    }
}

